package com.xiajiucai.baiping;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

  private Button cameraBut;
  private Button shareBut;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    cameraBut = findViewById(R.id.camera);
    shareBut = findViewById(R.id.share);

    cameraBut.setOnClickListener(new View.OnClickListener() {
      @Override public void onClick(View v) {
        Intent intent=new Intent();
        intent.setClass(MainActivity.this, CameraActivity.class);
        startActivity(intent);
      }
    });

    shareBut.setOnClickListener(new View.OnClickListener() {
      @Override public void onClick(View v) {
        Intent intent=new Intent();
        intent.setClass(MainActivity.this, ShareActivity.class);
        startActivity(intent);
      }
    });
  }
}